import request from '@/utils/request.ts'

export const getAddressList = ({ userid }) => {
  return request({
    url: '/address/list',
    method: 'get',
    data: { userid },

  })
}


// 新增地址接口
export const getAdd = ({ data }) => {
  return request({
    url: '/address/add',
    method: 'post',
    data: { data },

  })
}

// 查询地址接口
export const queryAddress = ({ userid }) => {
  return request({
    url: '/address/defaultAddress',
    method: 'post',
    data: { userid },

  })
}

// 更新地址接口
export const updateAddress = ({ data }) => {
  return request({
    url: '/address/update',
    method: 'post',
    data: { data },

  })
}


// 删除地址
export const deleteAddress = ({ addressid }) => {
  return request({
    url: '/address/delete',
    method: 'post',
    data: { addressid },

  })
}








